﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace PivotPhysics_Viewer
{
    /// <summary>
    /// Class to open a URL
    /// </summary>
    public class OpenURL : HyperlinkButton
    {
        /// <summary>
        /// Open the given URL in a browser window.
        /// </summary>
        /// <param name="u"></param>
        public static void OpenBrowserWithURL(Uri u)
        {
            var hlb = new OpenURL();
            hlb.TargetName = "_blank";
            hlb.NavigateUri = u;
            hlb.OnClick();
        }
    }
}
